package com.msmall.community.play.cases.dao;

import java.util.List;

import com.msmall.base.dao.BaseDao;
import com.msmall.community.play.cases.model.Action;
import com.msmall.community.play.cases.model.Scenario;
import com.msmall.community.play.cases.model.Target;

public interface ScenarioDao extends BaseDao<Scenario, Long>{

	/**
	 * 通过场景ID获得此场景下所有的ACTION
	 * @param scenarioId
	 * @return
	 */
	public List<Action> getActionsByScenario(Long scenarioId) throws Exception;
	/**
	 *  通过场景ID获得此场景下所有的TARGET
	 * @param scenarioId
	 * @return
	 */
	public List<Target> getTargetsByScenario(Long scenarioId) throws Exception;
	
	/**
	 * 找到此动作所有的直接结果场景
	 * @param actionId
	 * @return
	 * @throws Exception
	 */
	public List<Scenario> getByAction(Long actionId) throws Exception;
	/**
	 * 找到此动作对象所有的直接结果场景
	 * @param targetId
	 * @return
	 * @throws Exception
	 */
	public List<Scenario> getByTarget(Long targetId) throws Exception;
	
	/**
	 * 通过动作和对象找到唯一的直接结果场景
	 * @param actionId
	 * @param targetId
	 * @return
	 * @throws Exception
	 */
	public Scenario getByActionTarget(Long actionId,Long targetId) throws Exception;
	
	public void removeScenario(Long scenarioId) throws Exception;
}
